package com.csdn.service.impl;

import com.csdn.entity.CatContext;
import com.csdn.service.CatService;
import com.dianping.cat.message.internal.DefaultTransaction;
import org.springframework.stereotype.Service;

@Service
public class CatServiceImpl implements CatService {
    @Override
    public String hello(CatContext context) {
        DefaultTransaction myTransaction = context.getMyTransaction();
        myTransaction.setName("cat.Service");
        try {
            Thread.sleep(500);
        } catch (Exception e) {
        }
        myTransaction.setSuccessStatus();
        return "hello world";
    }
}
